package com.realtyManage.springboot.Dao;


import com.realtyManage.springboot.Model.Do.Dictionaries;
import com.realtyManage.springboot.Model.Do.DictionariesZero;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Modifying;
import org.springframework.data.jpa.repository.Query;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * 数据字典
 *
 * @author 杭州素色网络科技有限公司
 * @since 2019-09-23
 */

@Repository
public interface DictionariesZeroRepository extends JpaRepository<DictionariesZero, Integer>, JpaSpecificationExecutor<DictionariesZero> {

    @Query(value="select * from dictionaries_zero where is_show = 0",nativeQuery=true)
    List<DictionariesZero> findDictionariesZero();

    @Query(value="select type,title from dictionaries_zero where is_show = 0 and  menu_id = ?1 ",nativeQuery=true)
    String findType(String id);

}
